<template>
  <n-button type="info" @click="onCreate">创建项目</n-button>
</template>

<script lang="ts">
import {defineComponent, ref} from "vue";
import {NButton, useMessage} from "naive-ui"
import {GroupItem} from "@/pages/project/type";

export default defineComponent({
  name: "CreateProject",
  components: {NButton},
  setup() {
    const message = useMessage()
    const dialogActive = ref(false)
    const projectName = ref("")
    const projectDesc = ref("")
    const groupId = ref(0)
    const groupList = ref<GroupItem[]>([])

    function onSubmit() {
    }

    function onCreate() {
      message.error("团队不存在")
      return
    }

    return {
      dialogActive,
      projectName,
      projectDesc,
      groupId,
      groupList,
      onSubmit,
      onCreate
    }
  }
})

</script>

<style scoped>
.btn {
  width: fit-content;
}
</style>